{% extends "menu.html" %}
{% block content %}
    <div class="right_col" role="main">
          <div class="">
            <div class="page-title">



            </div>
            <div class="clearfix"></div>
            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title">
                    <h2>默认设置 </h2>

                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">
                    <br />
                    <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" method="post">
                        {% csrf_token %}
                        <div class="form-group">
                            <label for="username" class="col-sm-2 control-label">默认管理用户<span class="red-fonts">*</span></label>
{#                            <input name="ssh_user" value="root" style="display: none">#}
                            <div class="col-sm-8">
                                <input id="username" name="ssh_user" placeholder="Username" type="text" value="root" class="form-control" required>
                                <span class="help-block m-b-none"> 管理账号是服务器存在的root等高权限账号(或拥有NOPASSWD: ALL sudo权限)，用来推送新建系统用户</span>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="key" class="col-sm-2 control-label">默认密码</label>
                            <div class="col-sm-8">
                                <input id="password" name="ssh_pwd" placeholder="Password" type="password" class="form-control" required>
                                <span class="help-block m-b-none">如果不修改密码，请留空</span>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="port" class="col-sm-2 control-label">默认ssh端口<span class="red-fonts">*</span></label>
                            <div class="col-sm-8">
                                <input id="port" name="ssh_port" placeholder="Port" type="text" value="22" class="form-control">
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label for="key" class="col-sm-2 control-label">默认密钥</label>
                            <div class="col-sm-8">
                                <textarea class="form-control" name="ssh_key" placeholder="请复制粘贴私钥" rows="10" style="font-size: 9px;" required></textarea>
                                <span class="help-block m-b-none">如果不修改密钥，请留空, 密钥密码必填一项</span>
                                <span style="color: red">{{ result }}</span>
                            </div>
                        </div>

                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button class="btn btn-white" type="reset">取消</button>
                                <button id="submit_button" class="btn btn-primary" type="submit">确认保存</button>
                            </div>
                        </div>


                    </form>

                  </div>
                </div>
              </div>
            </div>


          </div>
        </div>
{% endblock %}